tools/xenstore: fix quota check in transaction_fix_domains()
authorJuergen Gross <jgross@suse.com>
Mon, 24 Apr 2023 10:59:13 +0000 (12:59 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 24 Apr 2023 10:59:13 +0000 (12:59 +0200)
commitbc5ecfbbc2bc75074de4687eaf2de809f4fdb8f2
tree036fd83aa5b2419c11808b015385f4024101d330
parente4a5fb9227889bec99ab212b839680f4d5b51e60
tools/xenstore: fix quota check in transaction_fix_domains()

Today when finalizing a transaction the number of node quota is checked
to not being exceeded after the transaction. This check is always done,
even if the transaction is being performed by a privileged connection,
or if there were no nodes created in the transaction.

Correct that by checking quota only if:
- the transaction is being performed by an unprivileged guest, and
- at least one node was created in the transaction

Reported-by: Julien Grall <julien@xen.org>
Fixes: f2bebf72c4d5 ("xenstore: rework of transaction handling")
Signed-off-by: Juergen Gross <jgross@suse.com>
master commit: f6b801c36bd5e4ab22a9f80c8d57121b62b139af
master date: 2023-03-29 22:02:36 +0100
tools/xenstore/xenstored_core.c
tools/xenstore/xenstored_transaction.c
tools/xenstore/xenstored_transaction.h